class User {

    private config: any; // 定义私有变量 config

    constructor() {
        this.config = useRuntimeConfig(); // 在构造函数中初始化 config
    }

    async getDetail(id: string) {
        let url = `${this.config.public.apiUrl}user/author?id=${id}`
        // console.log(url)
        const res = await $fetch(url)
        // console.log(res)
        return res;
    }
}

export default User